package exam.demo17;

import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        int n = in.nextInt();
        int k = in.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];
        for(int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }
        for(int i = 0; i < n; i++) {
            b[i] = in.nextInt();
        }
        int[] happy = new int[n-k+1];
        int[] shame = new int[n-k+1];
        for(int i = 0; i < n - k + 1; i++) {
            int x = k;
            while(x != 0) {
                happy[i] += a[i+x-1];
                shame[i] += b[i+x-1];
                x--;
            }
        }
        int max = 0;
        for(int i = 0; i < n - k + 1; i++) {
            max = Math.max(max, happy[i]);
        }
        StringBuffer str = new StringBuffer();
        for(int i = 0; i < n - k + 1; i++) {
            if(max == happy[i]) {
                str.append(i);
            }
        }
        int len = str.length();
        if(len == 1) {
            System.out.println(str);
        }else {
            int[] arr = new int[len];
            StringBuffer str1 = new StringBuffer();
            int min = shame[str.charAt(0) - '0'];
            for(int i = 0; i < len; i++) {
                int x = str.charAt(i) - '0';
                min = Math.min(min, shame[x]);
            }
            if(str1.length() == 1) {
                System.out.println(str);
            }else {
                System.out.println(str);
            }
        }
    }
}
